<!--
 * @Author: wangming
 * @Date: 2021-04-01 17:15:13
 * @LastEditors: wangming
 * @LastEditTime: 2021-04-01 17:15:47
 * @Description: file content
-->
<template>
  <el-form-item label="第三方服务" class="tr">
    <el-select
      style="width: 100%"
      v-model="value.__config.servekey"
      clearable
      placeholder="请选择"
    >
      <el-option
        v-for="item in servekeyList"
        :key="item.value"
        :label="item.label"
        :value="item.value"
      >
      </el-option>
    </el-select>
  </el-form-item>
</template>
<script>
import basicmixins from "./basicmixins";
import { getHmhttpserviceList } from "@/apis/paas/HmHttpServiceController.js";
export default {
  mixins: [basicmixins],
  data() {
    return {
      servekeyList: [],
    };
  },
  created() {
    this.loadHttpServiceList();
  },
  methods: {
    /**
     * 加载第三方服务数据
     */
    loadHttpServiceList() {
      getHmhttpserviceList().then((res) => {
        this.servekeyList =
          res?.map((item) => {
            return {
              value: item.key,
              label: item.name,
            };
          }) || [];
      });
    },
  },
};
</script>
<style lang="scss" scoped></style>
